// 引入组件
import Home from '../components/Home';
import Category from '../components/Category';
    import Handpick from '../components/Category/Handpick';
    import Ai from '../components/Category/Ai';
    import Cloud from '../components/Category/Cloud';
    import Things from '../components/Category/Things';
import User from '../components/User';
import Login from '../components/Login';


// 模块化路由配置
const routers = [{
        path: '/',
        component: Home,
        exact: true
    },
    {
        path: '/category',
        component: Category,
        routes: [ // 嵌套路由的配置
            {
                path: '/category/',
                component: Handpick
            },
            {
                path: '/category/ai',
                component: Ai
            },
            {
                path: '/category/cloud',
                component: Cloud
            }, 
            {
                path: '/category/things',
                component: Things
            }
        ]
    },
    {
        path: '/user',
        component: User
    },
    {
        path: '/login',
        component: Login
    }
];
export default routers;